<!DOCTYPE html>
<uieip type="page" value="login" debug="true"></uieip>
<uieip type="reg" value="console"></uieip>
<html>

<head>
    <uieip type="file" value="inc" src="/yqwin/easyui/include.txt"></uieip>
    <uieip type="file" value="css" src="/yqwin/css/yqwin.min" minute="10"></uieip>
    <uieip type="file" value="js" src="/yqwin/src/yqwin.min" minute="10"></uieip>
    <title>Nginx 服务管理</title>
    <style>
        .status {
            font-weight: bold;
            font-size: 1.2em;
        }

        .status.active {
            color: #28a745;
        }

        .status.inactive {
            color: #dc3545;
        }

        .yqwin-combo-btn-icon {
            padding: 8px 6px;
            font-size: 18px;
        }
    </style>
</head>

<body>
    <div id="div_nginx" style="width:100%;height:300px;"></div>
    <script type="text/javascript" src="/adp/svradmin/js/yq.svradnginx.js"></script>
    <script>
        $(function () {
            main_fun.init();
        })

        const page_fun = {
            // 最小窗口尺寸
            MIN_WIDTH: 700,
            MIN_HEIGHT: 400,

            init() {
                // 绑定窗口大小改变事件
                $(window).on('resize', () => this.onresize());
                this.onresize();
            },
            onresize() {
                const width = Math.max(window.innerWidth, this.MIN_WIDTH);
                const height = Math.max(window.innerHeight, this.MIN_HEIGHT);

                main_fun.resize({
                    width: width,
                    height: height
                });
            }
        }

        const main_fun = {
            id: "div_nginx",
            init() {
                $("#" + main_fun.id).yqSvrAdNginx({
                    afterBindingTitle: function () {
                        page_fun.init();
                    },   //标题绑定后
                });
            },
            resize(res) {
                $("#" + main_fun.id).yqSvrAdNginx("resize", res);
            },
        }
    </script>
 </body>

</html>